package com.twu.biblioteca;

public class BookInformation {

    private String name;
    private String author;
    private String description;

    public BookInformation(String bookName, String bookAuthor, String bookDescription) {
        name = bookName;
        author = bookAuthor;
        description = bookDescription;
    }

    public String getName() {
        return name;
    }

    public String getAuthor() {
        return  author;
    }

    public String getDescription() {
        return  description;
    }

    @Override
    public boolean equals(Object objectToCompare) {
        if(!(objectToCompare instanceof BookInformation))
            return false;

        BookInformation bookInfoToCompare = (BookInformation) objectToCompare;
        if(name.equals(bookInfoToCompare.getName()) && author.equals(bookInfoToCompare.getAuthor())
                && description.equals(bookInfoToCompare.getDescription()))
            return true;

        return false;
    }

}
